﻿
namespace SharePoint.Contrib.Diagnostics
{
    /// <summary>
    /// Encapsulates information about a trace message written via the IDiagnosticsService
    /// </summary>
    public interface ITraceMessage
    {
        /// <summary>
        /// The DiagnosticsArea to use for tracing
        /// </summary>
        string Area { get; }
        /// <summary>
        /// The DiagnosticsCategory to use for tracing
        /// </summary>
        string Category { get; }
        /// <summary>
        /// The Message ID that gets appended to the trace message.
        /// </summary>
        int MessageId { get; }

        /// <summary>
        /// Writes a trace message to the ULS log
        /// </summary>
        /// <param name="message">the message</param>
        /// <param name="args">optional args to string.format</param>
        void Trace(string message, params object[] args);
    }
}
